package com.edu.test;

import com.edu.bean.User;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author:mx
 * @Date:2025/10/31-8:55:05
 */
public class MyTest02 {

    @Test
    public void test(){
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("spring-ioc.xml");
        User user = ctx.getBean(User.class);
//        Object bean = ctx.getBean("u1");
//        System.out.println(user == bean);
        System.out.println(user);
        ctx.close();
    }
}
